/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package reportcenter.enduser.ui;

import javax.swing.JButton;
import javax.swing.JComponent;
import org.springframework.richclient.form.AbstractForm;
import org.springframework.richclient.form.builder.TableFormBuilder;
import reportcenter.report.dominio.export.Export;
import reportcenter.support.custom.binding.DirectoryBinding;

/**
 *
 * @author renan_luz
 */
public class ExportReportForm extends AbstractForm {

    private JComponent titleField;

    public ExportReportForm(Export export) {
        super(export);
        
//        super(FormModelHelper.createFormModel(new ObjectExample()));
        setId("exportReportForm");
    }

    @Override
    protected JComponent createFormControl() {
        TableFormBuilder formBuilder = new TableFormBuilder(getBindingFactory());

        formBuilder.setLabelAttributes("colGrId=label colSpec=right:pref");

        formBuilder.addSeparator(getMessage("exportReportForm.separator.parametros"));
        formBuilder.row();
        
        JButton b = new JButton("Teste");
        
        
        formBuilder.addSeparator(getMessage("exportReportForm.separator.destino"));
        formBuilder.row();
         DirectoryBinding binding = new DirectoryBinding(getFormModel(), "destino");  
         formBuilder.add(binding);  
        

        return formBuilder.getForm();
    }

    public boolean requestFocusInWindow() {
        return titleField.requestFocusInWindow();
    }
}
